/* eslint-disable */
var ortWasmThreaded = (() => {
  var _scriptName = import.meta.url;
  
  return (
async function(moduleArg = {}) {
  var moduleRtn;

function aa(){h.buffer!=l.buffer&&m();return l}function n(){h.buffer!=l.buffer&&m();return ba}function r(){h.buffer!=l.buffer&&m();return ca}function u(){h.buffer!=l.buffer&&m();return da}function ea(){h.buffer!=l.buffer&&m();return fa}var w=Object.assign({},moduleArg),ha,z,ia=new Promise((a,b)=>{ha=a;z=b}),ja="object"==typeof window,A="function"==typeof importScripts,B="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,C=A&&"em-pthread"==self.name;
if(B){const {createRequire:a}=await import("module");var require=a(import.meta.url),D=require("worker_threads");global.Worker=D.Worker;C=(A=!D.ab)&&"em-pthread"==D.workerData}"use strict";w.mountExternalData=(a,b)=>{a.startsWith("./")&&(a=a.substring(2));(w.Na||(w.Na=new Map)).set(a,b)};w.unmountExternalData=()=>{delete w.Na};
var SharedArrayBuffer=globalThis.SharedArrayBuffer??(new WebAssembly.Memory({initial:0,maximum:0,shared:!0})).buffer.constructor,ka=Object.assign({},w),la="./this.program",E=(a,b)=>{throw b;},F="",ma,G,H;
if(B){var fs=require("fs"),na=require("path");F=require("url").fileURLToPath(new URL("./",import.meta.url));ma=(a,b)=>{a=I(a)?new URL(a):na.normalize(a);return fs.readFileSync(a,b?void 0:"utf8")};H=a=>{a=ma(a,!0);a.buffer||(a=new Uint8Array(a));return a};G=(a,b,c,d=!0)=>{a=I(a)?new URL(a):na.normalize(a);fs.readFile(a,d?void 0:"utf8",(g,f)=>{g?c(g):b(d?f.buffer:f)})};!w.thisProgram&&1<process.argv.length&&(la=process.argv[1].replace(/\\/g,"/"));process.argv.slice(2);E=(a,b)=>{process.exitCode=
a;throw b;}}else if(ja||A)A?F=self.location.href:"undefined"!=typeof document&&document.currentScript&&(F=document.currentScript.src),_scriptName&&(F=_scriptName),F.startsWith("blob:")?F="":F=F.substr(0,F.replace(/[?#].*/,"").lastIndexOf("/")+1),B||(ma=a=>{var b=new XMLHttpRequest;b.open("GET",a,!1);b.send(null);return b.responseText},A&&(H=a=>{var b=new XMLHttpRequest;b.open("GET",a,!1);b.responseType="arraybuffer";b.send(null);return new Uint8Array(b.response)}),G=(a,b,c)=>{var d=new XMLHttpRequest;
d.open("GET",a,!0);d.responseType="arraybuffer";d.onload=()=>{200==d.status||0==d.status&&d.response?b(d.response):c()};d.onerror=c;d.send(null)});B&&"undefined"==typeof performance&&(global.performance=require("perf_hooks").performance);var oa=console.log.bind(console),pa=console.error.bind(console);B&&(oa=(...a)=>fs.writeSync(1,a.join(" ")+"\n"),pa=(...a)=>fs.writeSync(2,a.join(" ")+"\n"));var qa=oa,K=pa;Object.assign(w,ka);ka=null;
if(C){var ra;if(B){var sa=D.parentPort;sa.on("message",b=>onmessage({data:b}));Object.assign(globalThis,{self:global,importScripts:()=>{},postMessage:b=>sa.postMessage(b),performance:global.performance||{now:Date.now}})}var ta=!1;K=function(...b){b=b.join(" ");B?fs.writeSync(2,b+"\n"):console.error(b)};self.alert=function(...b){postMessage({Ra:"alert",text:b.join(" "),cb:L()})};w.instantiateWasm=(b,c)=>new Promise(d=>{ra=g=>{g=new WebAssembly.Instance(g,ua());c(g);d()}});self.onunhandledrejection=
b=>{throw b.reason||b;};function a(b){try{var c=b.data,d=c.cmd;if("load"===d){let g=[];self.onmessage=f=>g.push(f);self.startWorker=()=>{postMessage({cmd:"loaded"});for(let f of g)a(f);self.onmessage=a};for(const f of c.handlers)if(!w[f]||w[f].proxy)w[f]=(...k)=>{postMessage({Ra:"callHandler",$a:f,args:k})},"print"==f&&(qa=w[f]),"printErr"==f&&(K=w[f]);h=c.wasmMemory;m();ra(c.wasmModule)}else if("run"===d){va(c.pthread_ptr,0,0,1,0,0);wa(c.pthread_ptr);xa();ya();ta||=!0;try{za(c.start_routine,c.arg)}catch(g){if("unwind"!=
g)throw g;}}else"cancel"===d?L()&&M(-1):"setimmediate"!==c.target&&("checkMailbox"===d?ta&&Aa():d&&(K(`worker: received unknown command ${d}`),K(c)))}catch(g){throw Ba(),g;}}self.onmessage=a}var N;w.wasmBinary&&(N=w.wasmBinary);var h,Ca,Da=!1,O,l,ba,ca,da,P,fa;
function m(){var a=h.buffer;w.HEAP8=l=new Int8Array(a);w.HEAP16=new Int16Array(a);w.HEAPU8=ba=new Uint8Array(a);w.HEAPU16=new Uint16Array(a);w.HEAP32=ca=new Int32Array(a);w.HEAPU32=da=new Uint32Array(a);w.HEAPF32=new Float32Array(a);w.HEAPF64=fa=new Float64Array(a);w.HEAP64=P=new BigInt64Array(a);w.HEAPU64=new BigUint64Array(a)}
if(!C){h=new WebAssembly.Memory({initial:256,maximum:65536,shared:!0});if(!(h.buffer instanceof SharedArrayBuffer))throw K("requested a shared WebAssembly.Memory but the returned buffer is not a SharedArrayBuffer, indicating that while the browser has SharedArrayBuffer it does not have WebAssembly threads support - you may need to set a flag"),B&&K("(on node you may need: --experimental-wasm-threads --experimental-wasm-bulk-memory and/or recent version)"),Error("bad memory");m()}
var Ea=[],Fa=[],Ga=[],Q=0,Ha=null,R=null;function Ia(){Q--;if(0==Q&&(null!==Ha&&(clearInterval(Ha),Ha=null),R)){var a=R;R=null;a()}}function Ja(a){a="Aborted("+a+")";K(a);Da=!0;O=1;a=new WebAssembly.RuntimeError(a+". Build with -sASSERTIONS for more info.");z(a);throw a;}var Ka=a=>a.startsWith("data:application/octet-stream;base64,"),I=a=>a.startsWith("file://"),La;function Ma(a){if(a==La&&N)return new Uint8Array(N);if(H)return H(a);throw"both async and sync fetching of the wasm failed";}
function Na(a){if(!N&&(ja||A)){if("function"==typeof fetch&&!I(a))return fetch(a,{credentials:"same-origin"}).then(b=>{if(!b.ok)throw`failed to load wasm binary file at '${a}'`;return b.arrayBuffer()}).catch(()=>Ma(a));if(G)return new Promise((b,c)=>{G(a,d=>b(new Uint8Array(d)),c)})}return Promise.resolve().then(()=>Ma(a))}function Oa(a,b,c){return Na(a).then(d=>WebAssembly.instantiate(d,b)).then(c,d=>{K(`failed to asynchronously prepare wasm: ${d}`);Ja(d)})}
function Pa(a,b){var c=La;return N||"function"!=typeof WebAssembly.instantiateStreaming||Ka(c)||I(c)||B||"function"!=typeof fetch?Oa(c,a,b):fetch(c,{credentials:"same-origin"}).then(d=>WebAssembly.instantiateStreaming(d,a).then(b,function(g){K(`wasm streaming compile failed: ${g}`);K("falling back to ArrayBuffer instantiation");return Oa(c,a,b)}))}
function ua(){Qa={A:Ra,c:Sa,R:Ta,w:Ua,y:Va,n:Wa,P:Xa,I:Ya,O:Za,i:$a,x:ab,u:bb,Q:cb,v:db,H:eb,l:fb,L:gb,q:hb,B:ib,g:jb,K:wa,k:kb,E:lb,F:mb,G:nb,C:ob,D:pb,p:qb,T:rb,h:sb,e:tb,j:ub,r:vb,b:wb,s:xb,o:yb,M:zb,N:Ab,z:Bb,d:Cb,f:Db,J:Eb,t:Fb,a:h,S:Gb,m:Hb};return{a:Qa}}
var Jb={121780:(a,b,c,d,g)=>{if("undefined"==typeof w||!w.Na)return 1;a=Ib(a>>>0);a.startsWith("./")&&(a=a.substring(2));a=w.Na.get(a);if(!a)return 2;b>>>=0;c>>>=0;d>>>=0;if(b+c>a.byteLength)return 3;try{const f=a.subarray(b,b+c);switch(g){case 0:n().set(f,d>>>0);break;case 1:w.bb(d,f);break;default:return 4}return 0}catch{return 4}}};function Kb(a){this.name="ExitStatus";this.message=`Program terminated with exit(${a})`;this.status=a}
var Lb=a=>{a.terminate();a.onmessage=()=>{}},Ob=a=>{0==S.length&&(Mb(),Nb(S[0]));var b=S.pop();if(!b)return 6;T.push(b);U[a.Ka]=b;b.Ka=a.Ka;var c={cmd:"run",start_routine:a.Ta,arg:a.Sa,pthread_ptr:a.Ka};B&&b.unref();b.postMessage(c,a.Ya);return 0},V=0,W=(a,b,...c)=>{for(var d=2*c.length,g=Pb(),f=Qb(8*d),k=f>>>3,q=0;q<c.length;q++){var x=c[q];"bigint"==typeof x?(P[k+2*q]=1n,P[k+2*q+1]=x):(P[k+2*q]=0n,ea()[k+2*q+1>>>0]=x)}a=Rb(a,0,d,f,b);Vb(g);return a};
function Wb(a){if(C)return W(0,1,a);O=a;if(!(0<V)){for(var b of T)Lb(b);for(b of S)Lb(b);S=[];T=[];U=[];Da=!0}E(a,new Kb(a))}function Xb(a){if(C)return W(1,0,a);Bb(a)}var Bb=a=>{O=a;if(C)throw Xb(a),"unwind";Wb(a)},S=[],T=[],Yb=[],U={};function Zb(){for(var a=w.numThreads-1;a--;)Mb();Ea.unshift(()=>{Q++;$b(()=>Ia())})}var bc=a=>{var b=a.Ka;delete U[b];S.push(a);T.splice(T.indexOf(a),1);a.Ka=0;ac(b)};function ya(){Yb.forEach(a=>a())}
var Nb=a=>new Promise(b=>{a.onmessage=f=>{f=f.data;var k=f.cmd;if(f.targetThread&&f.targetThread!=L()){var q=U[f.targetThread];q?q.postMessage(f,f.transferList):K(`Internal error! Worker sent a message "${k}" to target pthread ${f.targetThread}, but that thread no longer exists!`)}else if("checkMailbox"===k)Aa();else if("spawnThread"===k)Ob(f);else if("cleanupThread"===k)bc(U[f.thread]);else if("killThread"===k)f=f.thread,k=U[f],delete U[f],Lb(k),ac(f),T.splice(T.indexOf(k),1),k.Ka=0;else if("cancelThread"===
k)U[f.thread].postMessage({cmd:"cancel"});else if("loaded"===k)a.loaded=!0,B&&!a.Ka&&a.unref(),b(a);else if("alert"===k)alert(`Thread ${f.threadId}: ${f.text}`);else if("setimmediate"===f.target)a.postMessage(f);else if("callHandler"===k)w[f.handler](...f.args);else k&&K(`worker sent an unknown command ${k}`)};a.onerror=f=>{K(`${"worker sent an error!"} ${f.filename}:${f.lineno}: ${f.message}`);throw f;};B&&(a.on("message",f=>a.onmessage({data:f})),a.on("error",f=>a.onerror(f)));var c=[],d=[],g;for(g of d)w.hasOwnProperty(g)&&
c.push(g);a.postMessage({cmd:"load",handlers:c,wasmMemory:h,wasmModule:Ca})});function $b(a){C?a():Promise.all(S.map(Nb)).then(a)}function Mb(){var a=new Worker(new URL(import.meta.url),{type:"module",workerData:"em-pthread",name:"em-pthread"});S.push(a)}var cc=a=>{for(;0<a.length;)a.shift()(w)},xa=()=>{var a=L(),b=u()[a+52>>>2>>>0];a=u()[a+56>>>2>>>0];dc(b,b-a);Vb(b)},ec,za=(a,b)=>{V=0;a=ec.get(a)(b);0<V?O=a:M(a)};function fc(a,b,c,d){return C?W(2,1,a,b,c,d):Ra(a,b,c,d)}
function Ra(a,b,c,d){a>>>=0;b>>>=0;c>>>=0;d>>>=0;if("undefined"==typeof SharedArrayBuffer)return K("Current environment does not support SharedArrayBuffer, pthreads are not available!"),6;var g=[];if(C&&0===g.length)return fc(a,b,c,d);a={Ta:c,Ka:a,Sa:d,Ya:g};return C?(a.Ra="spawnThread",postMessage(a,g),0):Ob(a)}
var gc="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,hc=(a,b,c)=>{b>>>=0;var d=b+c;for(c=b;a[c]&&!(c>=d);)++c;if(16<c-b&&a.buffer&&gc)return gc.decode(a.buffer instanceof SharedArrayBuffer?a.slice(b,c):a.subarray(b,c));for(d="";b<c;){var g=a[b++];if(g&128){var f=a[b++]&63;if(192==(g&224))d+=String.fromCharCode((g&31)<<6|f);else{var k=a[b++]&63;g=224==(g&240)?(g&15)<<12|f<<6|k:(g&7)<<18|f<<12|k<<6|a[b++]&63;65536>g?d+=String.fromCharCode(g):(g-=65536,d+=String.fromCharCode(55296|g>>
10,56320|g&1023))}}else d+=String.fromCharCode(g)}return d},Ib=(a,b)=>(a>>>=0)?hc(n(),a,b):"";function Sa(a,b,c){return C?W(3,1,a,b,c):0}function Ta(a,b){if(C)return W(4,1,a,b)}
var ic=a=>{for(var b=0,c=0;c<a.length;++c){var d=a.charCodeAt(c);127>=d?b++:2047>=d?b+=2:55296<=d&&57343>=d?(b+=4,++c):b+=3}return b},jc=(a,b,c,d)=>{c>>>=0;if(!(0<d))return 0;var g=c;d=c+d-1;for(var f=0;f<a.length;++f){var k=a.charCodeAt(f);if(55296<=k&&57343>=k){var q=a.charCodeAt(++f);k=65536+((k&1023)<<10)|q&1023}if(127>=k){if(c>=d)break;b[c++>>>0]=k}else{if(2047>=k){if(c+1>=d)break;b[c++>>>0]=192|k>>6}else{if(65535>=k){if(c+2>=d)break;b[c++>>>0]=224|k>>12}else{if(c+3>=d)break;b[c++>>>0]=240|k>>
18;b[c++>>>0]=128|k>>12&63}b[c++>>>0]=128|k>>6&63}b[c++>>>0]=128|k&63}}b[c>>>0]=0;return c-g},X=(a,b,c)=>jc(a,n(),b,c);function Ua(a,b){if(C)return W(5,1,a,b)}function Va(a,b,c){if(C)return W(6,1,a,b,c)}function Wa(a,b,c){return C?W(7,1,a,b,c):0}function Xa(a,b){if(C)return W(8,1,a,b)}function Ya(a,b,c){if(C)return W(9,1,a,b,c)}function Za(a,b,c,d){if(C)return W(10,1,a,b,c,d)}function $a(a,b,c,d){if(C)return W(11,1,a,b,c,d)}function ab(a,b,c,d){if(C)return W(12,1,a,b,c,d)}
function bb(a){if(C)return W(13,1,a)}function cb(a,b){if(C)return W(14,1,a,b)}function db(a,b,c){if(C)return W(15,1,a,b,c)}var eb=()=>{Ja("")},fb=()=>1;function gb(a){va(a>>>0,!A,1,!ja,131072,!1);ya()}function wa(a){a>>>=0;"function"===typeof Atomics.Za&&(Atomics.Za(r(),a>>>2,a).value.then(Aa),a+=128,Atomics.store(r(),a>>>2,1))}var Aa=()=>{var a=L();if(a&&(wa(a),a=kc,!Da))try{if(a(),!(0<V))try{C?M(O):Bb(O)}catch(b){b instanceof Kb||"unwind"==b||E(1,b)}}catch(b){b instanceof Kb||"unwind"==b||E(1,b)}};
function hb(a,b){a>>>=0;a==b>>>0?setTimeout(Aa):C?postMessage({targetThread:a,cmd:"checkMailbox"}):(a=U[a])&&a.postMessage({cmd:"checkMailbox"})}var lc=[];function ib(a,b,c,d,g){b>>>=0;d/=2;lc.length=d;c=g>>>0>>>3;for(g=0;g<d;g++)lc[g]=P[c+2*g]?P[c+2*g+1]:ea()[c+2*g+1>>>0];return(b?Jb[b]:mc[a])(...lc)}function jb(a){a>>>=0;C?postMessage({cmd:"cleanupThread",thread:a}):bc(U[a])}function kb(a){B&&U[a>>>0].ref()}
function lb(a,b){a=-9007199254740992>a||9007199254740992<a?NaN:Number(a);b>>>=0;a=new Date(1E3*a);r()[b>>>2>>>0]=a.getUTCSeconds();r()[b+4>>>2>>>0]=a.getUTCMinutes();r()[b+8>>>2>>>0]=a.getUTCHours();r()[b+12>>>2>>>0]=a.getUTCDate();r()[b+16>>>2>>>0]=a.getUTCMonth();r()[b+20>>>2>>>0]=a.getUTCFullYear()-1900;r()[b+24>>>2>>>0]=a.getUTCDay();a=(a.getTime()-Date.UTC(a.getUTCFullYear(),0,1,0,0,0,0))/864E5|0;r()[b+28>>>2>>>0]=a}
var Y=a=>0===a%4&&(0!==a%100||0===a%400),nc=[0,31,60,91,121,152,182,213,244,274,305,335],oc=[0,31,59,90,120,151,181,212,243,273,304,334];
function mb(a,b){a=-9007199254740992>a||9007199254740992<a?NaN:Number(a);b>>>=0;a=new Date(1E3*a);r()[b>>>2>>>0]=a.getSeconds();r()[b+4>>>2>>>0]=a.getMinutes();r()[b+8>>>2>>>0]=a.getHours();r()[b+12>>>2>>>0]=a.getDate();r()[b+16>>>2>>>0]=a.getMonth();r()[b+20>>>2>>>0]=a.getFullYear()-1900;r()[b+24>>>2>>>0]=a.getDay();var c=(Y(a.getFullYear())?nc:oc)[a.getMonth()]+a.getDate()-1|0;r()[b+28>>>2>>>0]=c;r()[b+36>>>2>>>0]=-(60*a.getTimezoneOffset());c=(new Date(a.getFullYear(),6,1)).getTimezoneOffset();
var d=(new Date(a.getFullYear(),0,1)).getTimezoneOffset();a=(c!=d&&a.getTimezoneOffset()==Math.min(d,c))|0;r()[b+32>>>2>>>0]=a}
function nb(a){a>>>=0;var b=new Date(r()[a+20>>>2>>>0]+1900,r()[a+16>>>2>>>0],r()[a+12>>>2>>>0],r()[a+8>>>2>>>0],r()[a+4>>>2>>>0],r()[a>>>2>>>0],0),c=r()[a+32>>>2>>>0],d=b.getTimezoneOffset(),g=(new Date(b.getFullYear(),6,1)).getTimezoneOffset(),f=(new Date(b.getFullYear(),0,1)).getTimezoneOffset(),k=Math.min(f,g);0>c?r()[a+32>>>2>>>0]=Number(g!=f&&k==d):0<c!=(k==d)&&(g=Math.max(f,g),b.setTime(b.getTime()+6E4*((0<c?k:g)-d)));r()[a+24>>>2>>>0]=b.getDay();c=(Y(b.getFullYear())?nc:oc)[b.getMonth()]+
b.getDate()-1|0;r()[a+28>>>2>>>0]=c;r()[a>>>2>>>0]=b.getSeconds();r()[a+4>>>2>>>0]=b.getMinutes();r()[a+8>>>2>>>0]=b.getHours();r()[a+12>>>2>>>0]=b.getDate();r()[a+16>>>2>>>0]=b.getMonth();r()[a+20>>>2>>>0]=b.getYear();a=b.getTime();return BigInt(isNaN(a)?-1:a/1E3)}function ob(a,b,c,d,g,f,k){return C?W(16,1,a,b,c,d,g,f,k):-52}function pb(a,b,c,d,g,f){if(C)return W(17,1,a,b,c,d,g,f)}
function qb(a,b,c,d){a>>>=0;b>>>=0;c>>>=0;d>>>=0;var g=(new Date).getFullYear(),f=new Date(g,0,1),k=new Date(g,6,1);g=f.getTimezoneOffset();var q=k.getTimezoneOffset(),x=Math.max(g,q);u()[a>>>2>>>0]=60*x;r()[b>>>2>>>0]=Number(g!=q);a=v=>v.toLocaleTimeString(void 0,{hour12:!1,timeZoneName:"short"}).split(" ")[1];f=a(f);k=a(k);q<g?(X(f,c,17),X(k,d,17)):(X(f,d,17),X(k,c,17))}var pc=[];
function rb(a,b,c){a>>>=0;b>>>=0;c>>>=0;pc.length=0;for(var d;d=n()[b++>>>0];){var g=105!=d;g&=112!=d;c+=g&&c%8?4:0;pc.push(112==d?u()[c>>>2>>>0]:106==d?P[c>>>3]:105==d?r()[c>>>2>>>0]:ea()[c>>>3>>>0]);c+=g?8:4}return Jb[a](...pc)}var sb=()=>{},tb=()=>Date.now(),ub=()=>{V+=1;throw"unwind";};function vb(){return 4294901760}var wb;wb=()=>performance.timeOrigin+performance.now();var xb=()=>B?require("os").cpus().length:navigator.hardwareConcurrency;
function yb(a){a>>>=0;var b=n().length;if(a<=b||4294901760<a)return!1;for(var c=1;4>=c;c*=2){var d=b*(1+.2/c);d=Math.min(d,a+100663296);var g=Math;d=Math.max(a,d);a:{g=(g.min.call(g,4294901760,d+(65536-d%65536)%65536)-h.buffer.byteLength+65535)/65536;try{h.grow(g);m();var f=1;break a}catch(k){}f=void 0}if(f)return!0}return!1}
var qc={},sc=()=>{if(!rc){var a={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:la||"./this.program"},b;for(b in qc)void 0===qc[b]?delete a[b]:a[b]=qc[b];var c=[];for(b in a)c.push(`${b}=${a[b]}`);rc=c}return rc},rc;
function zb(a,b){if(C)return W(18,1,a,b);a>>>=0;b>>>=0;var c=0;sc().forEach((d,g)=>{var f=b+c;g=u()[a+4*g>>>2>>>0]=f;for(f=0;f<d.length;++f)aa()[g++>>>0]=d.charCodeAt(f);aa()[g>>>0]=0;c+=d.length+1});return 0}function Ab(a,b){if(C)return W(19,1,a,b);a>>>=0;b>>>=0;var c=sc();u()[a>>>2>>>0]=c.length;var d=0;c.forEach(g=>d+=g.length+1);u()[b>>>2>>>0]=d;return 0}function Cb(a){return C?W(20,1,a):52}function Db(a,b,c,d){return C?W(21,1,a,b,c,d):52}function Eb(a,b,c,d){return C?W(22,1,a,b,c,d):70}
var tc=[null,[],[]];function Fb(a,b,c,d){if(C)return W(23,1,a,b,c,d);b>>>=0;c>>>=0;d>>>=0;for(var g=0,f=0;f<c;f++){var k=u()[b>>>2>>>0],q=u()[b+4>>>2>>>0];b+=8;for(var x=0;x<q;x++){var v=n()[k+x>>>0],y=tc[a];0===v||10===v?((1===a?qa:K)(hc(y,0)),y.length=0):y.push(v)}g+=q}u()[d>>>2>>>0]=g;return 0}var uc=[31,29,31,30,31,30,31,31,30,31,30,31],vc=[31,28,31,30,31,30,31,31,30,31,30,31];function wc(a){var b=Array(ic(a)+1);jc(a,b,0,b.length);return b}var xc=(a,b)=>{aa().set(a,b>>>0)};
function Gb(a,b,c,d){function g(e,p,t){for(e="number"==typeof e?e.toString():e||"";e.length<p;)e=t[0]+e;return e}function f(e,p){return g(e,p,"0")}function k(e,p){function t(Sb){return 0>Sb?-1:0<Sb?1:0}var J;0===(J=t(e.getFullYear()-p.getFullYear()))&&0===(J=t(e.getMonth()-p.getMonth()))&&(J=t(e.getDate()-p.getDate()));return J}function q(e){switch(e.getDay()){case 0:return new Date(e.getFullYear()-1,11,29);case 1:return e;case 2:return new Date(e.getFullYear(),0,3);case 3:return new Date(e.getFullYear(),
0,2);case 4:return new Date(e.getFullYear(),0,1);case 5:return new Date(e.getFullYear()-1,11,31);case 6:return new Date(e.getFullYear()-1,11,30)}}function x(e){var p=e.La;for(e=new Date((new Date(e.Ma+1900,0,1)).getTime());0<p;){var t=e.getMonth(),J=(Y(e.getFullYear())?uc:vc)[t];if(p>J-e.getDate())p-=J-e.getDate()+1,e.setDate(1),11>t?e.setMonth(t+1):(e.setMonth(0),e.setFullYear(e.getFullYear()+1));else{e.setDate(e.getDate()+p);break}}t=new Date(e.getFullYear()+1,0,4);p=q(new Date(e.getFullYear(),
0,4));t=q(t);return 0>=k(p,e)?0>=k(t,e)?e.getFullYear()+1:e.getFullYear():e.getFullYear()-1}a>>>=0;b>>>=0;c>>>=0;d>>>=0;var v=u()[d+40>>>2>>>0];d={Wa:r()[d>>>2>>>0],Va:r()[d+4>>>2>>>0],Oa:r()[d+8>>>2>>>0],Qa:r()[d+12>>>2>>>0],Pa:r()[d+16>>>2>>>0],Ma:r()[d+20>>>2>>>0],Ja:r()[d+24>>>2>>>0],La:r()[d+28>>>2>>>0],eb:r()[d+32>>>2>>>0],Ua:r()[d+36>>>2>>>0],Xa:v?Ib(v):""};c=Ib(c);v={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y",
"%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var y in v)c=c.replace(new RegExp(y,"g"),v[y]);var Tb="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),Ub="January February March April May June July August September October November December".split(" ");v={"%a":e=>Tb[e.Ja].substring(0,3),
"%A":e=>Tb[e.Ja],"%b":e=>Ub[e.Pa].substring(0,3),"%B":e=>Ub[e.Pa],"%C":e=>f((e.Ma+1900)/100|0,2),"%d":e=>f(e.Qa,2),"%e":e=>g(e.Qa,2," "),"%g":e=>x(e).toString().substring(2),"%G":x,"%H":e=>f(e.Oa,2),"%I":e=>{e=e.Oa;0==e?e=12:12<e&&(e-=12);return f(e,2)},"%j":e=>{for(var p=0,t=0;t<=e.Pa-1;p+=(Y(e.Ma+1900)?uc:vc)[t++]);return f(e.Qa+p,3)},"%m":e=>f(e.Pa+1,2),"%M":e=>f(e.Va,2),"%n":()=>"\n","%p":e=>0<=e.Oa&&12>e.Oa?"AM":"PM","%S":e=>f(e.Wa,2),"%t":()=>"\t","%u":e=>e.Ja||7,"%U":e=>f(Math.floor((e.La+
7-e.Ja)/7),2),"%V":e=>{var p=Math.floor((e.La+7-(e.Ja+6)%7)/7);2>=(e.Ja+371-e.La-2)%7&&p++;if(p)53==p&&(t=(e.Ja+371-e.La)%7,4==t||3==t&&Y(e.Ma)||(p=1));else{p=52;var t=(e.Ja+7-e.La-1)%7;(4==t||5==t&&Y(e.Ma%400-1))&&p++}return f(p,2)},"%w":e=>e.Ja,"%W":e=>f(Math.floor((e.La+7-(e.Ja+6)%7)/7),2),"%y":e=>(e.Ma+1900).toString().substring(2),"%Y":e=>e.Ma+1900,"%z":e=>{e=e.Ua;var p=0<=e;e=Math.abs(e)/60;return(p?"+":"-")+String("0000"+(e/60*100+e%60)).slice(-4)},"%Z":e=>e.Xa,"%%":()=>"%"};c=c.replace(/%%/g,
"\x00\x00");for(y in v)c.includes(y)&&(c=c.replace(new RegExp(y,"g"),v[y](d)));c=c.replace(/\0\0/g,"%");y=wc(c);if(y.length>b)return 0;xc(y,a);return y.length-1}function Hb(a,b,c,d){return Gb(a>>>0,b>>>0,c>>>0,d>>>0)}C||Zb();
var mc=[Wb,Xb,fc,Sa,Ta,Ua,Va,Wa,Xa,Ya,Za,$a,ab,bb,cb,db,ob,pb,zb,Ab,Cb,Db,Eb,Fb],Qa,Z=function(){function a(c,d){Z=c.exports;Z=yc();Yb.push(Z.xa);ec=Z.ya;Fa.unshift(Z.U);Ca=d;Ia();return Z}var b=ua();Q++;if(w.instantiateWasm)try{return w.instantiateWasm(b,a)}catch(c){K(`Module.instantiateWasm callback failed with error: ${c}`),z(c)}La||=w.locateFile?Ka("ort-wasm-simd-threaded.wasm")?"ort-wasm-simd-threaded.wasm":w.locateFile?w.locateFile("ort-wasm-simd-threaded.wasm",F):F+"ort-wasm-simd-threaded.wasm":
(new URL("ort-wasm-simd-threaded.wasm",import.meta.url)).href;Pa(b,function(c){a(c.instance,c.module)}).catch(z);return{}}();w._OrtInit=(a,b)=>(w._OrtInit=Z.V)(a,b);w._OrtGetLastError=(a,b)=>(w._OrtGetLastError=Z.W)(a,b);w._OrtCreateSessionOptions=(a,b,c,d,g,f,k,q,x,v)=>(w._OrtCreateSessionOptions=Z.X)(a,b,c,d,g,f,k,q,x,v);w._OrtAppendExecutionProvider=(a,b)=>(w._OrtAppendExecutionProvider=Z.Y)(a,b);w._OrtAddFreeDimensionOverride=(a,b,c)=>(w._OrtAddFreeDimensionOverride=Z.Z)(a,b,c);
w._OrtAddSessionConfigEntry=(a,b,c)=>(w._OrtAddSessionConfigEntry=Z._)(a,b,c);w._OrtReleaseSessionOptions=a=>(w._OrtReleaseSessionOptions=Z.$)(a);w._OrtCreateSession=(a,b,c)=>(w._OrtCreateSession=Z.aa)(a,b,c);w._OrtReleaseSession=a=>(w._OrtReleaseSession=Z.ba)(a);w._OrtGetInputOutputCount=(a,b,c)=>(w._OrtGetInputOutputCount=Z.ca)(a,b,c);w._OrtGetInputName=(a,b)=>(w._OrtGetInputName=Z.da)(a,b);w._OrtGetOutputName=(a,b)=>(w._OrtGetOutputName=Z.ea)(a,b);w._OrtFree=a=>(w._OrtFree=Z.fa)(a);
w._OrtCreateTensor=(a,b,c,d,g,f)=>(w._OrtCreateTensor=Z.ga)(a,b,c,d,g,f);w._OrtGetTensorData=(a,b,c,d,g)=>(w._OrtGetTensorData=Z.ha)(a,b,c,d,g);w._OrtReleaseTensor=a=>(w._OrtReleaseTensor=Z.ia)(a);w._OrtCreateRunOptions=(a,b,c,d)=>(w._OrtCreateRunOptions=Z.ja)(a,b,c,d);w._OrtAddRunConfigEntry=(a,b,c)=>(w._OrtAddRunConfigEntry=Z.ka)(a,b,c);w._OrtReleaseRunOptions=a=>(w._OrtReleaseRunOptions=Z.la)(a);w._OrtCreateBinding=a=>(w._OrtCreateBinding=Z.ma)(a);
w._OrtBindInput=(a,b,c)=>(w._OrtBindInput=Z.na)(a,b,c);w._OrtBindOutput=(a,b,c,d)=>(w._OrtBindOutput=Z.oa)(a,b,c,d);w._OrtClearBoundOutputs=a=>(w._OrtClearBoundOutputs=Z.pa)(a);w._OrtReleaseBinding=a=>(w._OrtReleaseBinding=Z.qa)(a);w._OrtRunWithBinding=(a,b,c,d,g)=>(w._OrtRunWithBinding=Z.ra)(a,b,c,d,g);w._OrtRun=(a,b,c,d,g,f,k,q)=>(w._OrtRun=Z.sa)(a,b,c,d,g,f,k,q);w._OrtEndProfiling=a=>(w._OrtEndProfiling=Z.ta)(a);var L=()=>(L=Z.ua)();w._malloc=a=>(w._malloc=Z.va)(a);w._free=a=>(w._free=Z.wa)(a);
var va=(a,b,c,d,g,f)=>(va=Z.za)(a,b,c,d,g,f),Ba=()=>(Ba=Z.Aa)(),Rb=(a,b,c,d,g)=>(Rb=Z.Ba)(a,b,c,d,g),ac=a=>(ac=Z.Ca)(a),M=a=>(M=Z.Da)(a),kc=()=>(kc=Z.Ea)(),dc=(a,b)=>(dc=Z.Fa)(a,b),Vb=a=>(Vb=Z.Ga)(a),Qb=a=>(Qb=Z.Ha)(a),Pb=()=>(Pb=Z.Ia)();function yc(){var a=Z;a=Object.assign({},a);var b=d=>()=>d()>>>0,c=d=>g=>d(g)>>>0;a.ua=b(a.ua);a.va=c(a.va);a.emscripten_main_runtime_thread_id=b(a.emscripten_main_runtime_thread_id);a.Ha=c(a.Ha);a.Ia=b(a.Ia);return a}w.stackSave=()=>Pb();w.stackRestore=a=>Vb(a);
w.stackAlloc=a=>Qb(a);w.UTF8ToString=Ib;w.stringToUTF8=X;w.lengthBytesUTF8=ic;var zc;R=function Ac(){zc||Bc();zc||(R=Ac)};function Bc(){0<Q||(C?(ha(w),C||cc(Fa),startWorker(w)):(cc(Ea),0<Q||zc||(zc=!0,w.calledRun=!0,Da||(C||cc(Fa),ha(w),C||cc(Ga)))))}Bc();moduleRtn=ia;


  return moduleRtn;
}
);
})();
export default ortWasmThreaded;
var isPthread = globalThis.self?.name === 'em-pthread';
var isNode = typeof globalThis.process?.versions?.node == 'string';
if (isNode) isPthread = (await import('worker_threads')).workerData === 'em-pthread';

// When running as a pthread, construct a new instance on startup
isPthread && ortWasmThreaded();
